<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('账户')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2"><font color="red">*</font>{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="adn[password]" autocomplete="new-password" placeholder="不修改密码请留空"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><font color="red">*</font>{:__('有效期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-leave_school_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[effective_start_time]" type="text" value="{$row.effective_start_time|datetime}" data-rule="required;" style="width: 48%;">至
            <input id="c-leave_school_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[effective_end_time]" type="text" value="{$row.effective_end_time|datetime}" data-rule="required;" style="width: 48%;">
        </div>
    </div>
    
    <div class="form-group hotel">
        <label class="control-label col-xs-12 col-sm-2">{:__('所属机构')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-agency_id" data-rule="required" data-source="agency/selectpage" data-params='{"id"}' data-multiple="false" data-primary-key="id" data-field="name" class="form-control selectpage" name="row[agency_id]" type="text" data-rule="required;" value="{$row.agency_id|htmlentities}">
        </div>
    </div>

    <div class="form-group hotel">
        <label class="control-label col-xs-12 col-sm-2">{:__('附属机构')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-attached_id" data-rule="required" data-source="agency/selectpage" data-params='{"id"}' data-multiple="false" data-primary-key="id" data-field="name" class="form-control selectpage" name="row[attached_id]" type="text" data-rule="required;" value="{$row.attached_id|htmlentities}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><font color="red">*</font>{:__('联系人')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="adn[nickname]" type="text" data-rule="required;" value="{$row.nickname|htmlentities}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><font color="red">*</font>{:__('电话')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="adn[mobile]" type="text" data-rule="required;mobile" value="{$row.mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('LOGO')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" class="form-control" size="50" name="row[avatar]" type="text" value="{$row.avatar|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="*" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><font color="red">*</font>{:__('学校地址')}:</label>
        <div class="col-xs-12 col-sm-8" data-toggle="cxselect" data-selects="province,city,area">
            <select class="province form-control" name="row[province]" data-url="ajax/area" style="width: 31%;">
                <!-- <option>请选择省</option> -->
                <option value="{$row.province}" selected>{$row.province_name}</option>
            </select>
            <select class="city form-control" name="row[city]" data-url="ajax/area" style="width: 31%;">
                <!-- <option>请选择市</option> -->
                <option value="{$row.city}" selected>{$row.province_name}</option>
            </select>
            <select class="area form-control" name="row[area]" data-url="ajax/area" style="width: 31%;">
                <!-- <option>请选择区</option> -->
                <option value="{$row.area}" selected>{$row.area_name}</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remarks" class="form-control " rows="5" name="row[remarks]" cols="50">{$row.remarks|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
